/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ua.yandex.threadpool;

import java.util.LinkedList;

/**
 *
 * @author Neophron
 */
public class MyQueue<E> {

    private final LinkedList<E> q = new LinkedList<>();

    public synchronized boolean isEmpty() {
        return q.isEmpty();
    }

    public synchronized void add(E el) {
        q.add(el);
    }

    public synchronized E poll() {
        return q.poll();
    }
}
